package jd.client.action;

import jd.client.Request;
import jd.client.ResponseFactory;

/**
 * @author Denis Migol
 * 
 */
public class ActionUpdateRequest extends Request {

	/**
	 * /action/update/force(0|1)/
	 */
	public static final String URL = "/action/update/force";

	private boolean force;

	static {
		ResponseFactory.register(ActionUpdateRequest.class, ActionUpdateResponse.class);
	}

	/**
	 * The constructor
	 */
	public ActionUpdateRequest() {
		super(URL);
	}

	@Override
	public String getUrl() {
		return super.getUrl() + (force ? '1' : '0') + "/";
	}

	/**
	 * @param force
	 *            the force to set
	 */
	public ActionUpdateRequest setForce(final boolean force) {
		this.force = force;
		return this;
	}

	/**
	 * @return the force
	 */
	public boolean isForce() {
		return force;
	}
}
